<template>
  <div class="home">
<!--    <img alt="Vue logo" src="../assets/logo.png">-->
<!--    <h1>欢迎 {{ username }}</h1>-->
<!--    <el-button type="primary" @click="testAuthc">登出</el-button>-->

    <NavMenu/>
    <router-view/>
  </div>
</template>

<script>
import NavMenu from "../components/NavMenu.vue";
export default {
  name: 'Home',
  data() {
    return {
      username: this.$store.state.user.nickname
    }
  },
  methods: {
    logout() {
      this.$store.commit('logout')
      this.$router.replace('login')
    },
    testAuthc() {
      this.$axios.get("logout").then(success => {
        console.log(success.data)
      }).catch(fail => {
        console.log(fail)
      })
    }
  },
  // eslint-disable-next-line vue/no-unused-components
  components: {NavMenu}
}
</script>
